import API from 'api'

import { ElMessage } from 'element-plus'

const types = {
  SET_USER_INFO:'SET_USER_INFO'
}


export default {
   state: {
      userInfo: null
   },
   getters: {
     userInfo:(state)=>{
       return state.userInfo
     }
   },
  mutations: {
    [types.SET_USER_INFO](state, data) {
      state.userInfo = data
    }
  },
  actions: {
      async login({commit},form) {
        //async todo
        // commit(types.SET_USER_INFO,data)
        return true
      }
  }
}